import http from '@/utils/http'
const env = import.meta.env
const BASE_URL = env.PROD ? `${env.VITE_API_BASE_URL}/api/v1` : '/api/v1'
const BASE_URL2 = env.PROD ? `${env.VITE_API_BASE_URL3}/api/v1` : '/aapi'

/** 商品转链 */
export function getTargetUrl(params: any) {
  return http.post(`${BASE_URL2}/share/getTargetUrl`, params)
}

/** @desc 设备统计 */
export function equipmentStatistics(data: any) {
  return http.post(`${BASE_URL}/user/wechat/list/statistical`, data)
}

/** @desc 设备列表统计 */
export function equipmentListStatistics(data: any) {
  return http.post(`${BASE_URL}/user/wechat/count`, data)
}

/** @desc 获取所有源头群-不带分页 */
export function getSource() {
  return http.get(`${BASE_URL}/sourceChatRoom/listForSearch`)
}

/** @desc 设备列表 */
export function equipmentList(data: any) {
  return http.post(`${BASE_URL}/user/wechat/list`, data)
}

/** @desc 用戶详情 */
export function wechatDetail(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail`, data)
}

/** @desc 切换到果冻版本 */
export function checkToGd(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/checkToGd`, data)
}

/** @desc 用戶详情-跟发源头群 */
export function detailSourceGroupInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/sourceGroupInfo`, data)
}

/** @desc 用戶详情-跟发源头群-预览 */
export function detailSourceGroupPreview(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/sourceGroupPreview`, data)
}

/** @desc 用戶详情-智能跟圈列表 */
export function detailmomentInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/momentInfo`, data)
}

/** @desc 用戶详情-智能跟圈详情 */
export function detailmomentInfoDetail(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/momentInfoDetail`, data)
}

/** @desc 用戶详情-智选跟群 */
export function detailmaterialInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/materialInfo`, data)
}

/** @desc 用戶详情-一键发群 */
export function oneClickGroupSendInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/oneClickGroupSendInfo`, data)
}

/** @desc 用戶详情-一键发圈 */
export function oneClickGroupMomentInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/oneClickGroupMomentInfo`, data)
}

/** @desc 用户详情-智选跟群-预览 */
export function detailMaterialPreview(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/materialPreview`, data)
}

/** @desc 用户详情-智选跟群-图片获取 */
export function wxPicUrl(data: any) {
  return http.post(`${BASE_URL}/public/file/wxPicUrl`, data)
}

/** @desc 用户详情-智能打招呼 */
export function detailGreetInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/greetInfo`, data)
}

/** @desc 用户详情-个人号 */
export function detailConfigInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/configInfo`, data)
}

/** @desc 用户详情-设备充值记录 */
export function getRenewListByUser(data: any) {
  return http.post(`${BASE_URL}/user/wechat/account/getRenewListByUser`, data)
}

/** @desc 用户补偿时长 */
export function accountRenewUserWechat(data: any) {
  return http.post(`${BASE_URL}/user/wechat/account/renewUserWechat`, data)
}

/** @desc 用户详情 - 中控管理 */
export function detailSupconInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/supconInfo`, data)
}

// /** @desc 用户补偿时长 */
// export function accountRenewUserWechat(data: any) {
//   return http.post(`${BASE_URL}/user/wechat/account/renewUserWechat`, data)
// }

/** @desc 创建新设备 */
export function accountAddUserWechat(data: any) {
  return http.post(`${BASE_URL}/user/wechat/account/addUserWechat`, data)
}

/** @desc 设备详情-关键词回复 */
export function detailKeywordInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/keywordInfo`, data)
}

/** @desc 设备详情-群管理 */
export function detailManageInfo(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/manageInfo`, data)
}

/** @desc 设备详情-日志 */
export function detailLogList(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/logList`, data)
}

/** @desc 检测-设备状态 */
export function detectionDeviceStatus(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/deviceStatus`, data)
}

/** @desc 检测-提醒续费 */
export function detectionReminderRenewal(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/reminderRenewal`, data)
}

/** @desc 检测-智选跟群 */
export function detectionMaterialGroupStatus(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/materialGroupStatus`, data)
}

/** @desc 检测-一键发群 */
export function detectionOneKeyGroupStatus(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/oneKeyGroupStatus`, data)
}

/** @desc 检测-一键发群失败列表 */
export function detectionOneKeyGroupFail(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/oneKeyGroupFail`, data)
}

/** @desc 检测-一键发圈 */
export function detectionOneKeyMomentStatus(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/oneKeyMomentStatus`, data)
}

/** @desc 检测-一键发圈失败列表 */
export function detectionOneKeyMomentFailList(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/oneKeyMomentFailList`, data)
}

/** @desc 检测-智能发圈 */
export function detectionMomentStatus(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/momentStatus`, data)
}

/** @desc 检测-智能发圈失败列表 */
export function detectionMomentFailList(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/momentFailList`, data)
}

/** @desc 检测-智选发群 */
export function detectionGroupStatus(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/groupStatus`, data)
}

/** @desc 检测-智选发群失败列表 */
export function detectionGroupFailList(data: any) {
  return http.post(`${BASE_URL}/user/wechat/detail/detection/groupFailList`, data)
}
